home *** CD-ROM | disk | FTP | other *** search
- /*************************************************************************
- * "sisbar.h"
- *-------------------------------------------------------------------------
- * Scroll bar library
- * Copyright (c) 1993, TaroPYON
- *************************************************************************/
-
- #ifndef _SISBAR_H
- #define _SISBAR_H
-
- #include <time.h>
-
- #ifndef _SIEV_H
- # include <siev.h>
- #endif
- #ifndef _SIWIN_H
- # include <siwin.h>
- #endif
-
- typedef struct _sb_t
- {
- unsigned int att; /* 属性 */
- unsigned int stt; /* ステータス */
-
- FRAME_T fr; /* 全体の表示位置 */
- FRAME_T frBar; /* バー部分表示位置 */
- FRAME_T frCur; /* カーソル部分表示位置 */
- FRAME_T frTop; /* 上(左)ボタン表示位置 */
- FRAME_T frBtm; /* 下(右)ボタン表示位置 */
- EV_T *ev; /* イベント */
- WIN_T *win; /* ウィンドゥ */
-
- clock_t clkRep; /* リピートタイム */
-
- long total; /* トータル数 */
- long min, max; /* 最大最小値 */
- long top; /* 表示先頭位置 */
- long widMin,widMax; /* 幅,最小/最大 */
- long wid; /* 表示幅 */
- long dt; /* 移動数 */
- int bar; /* 最低バーサイズ(ドット) */
-
- int (*func)(int,struct _sb_t *);
- void *ptr;
-
- int evNo[8]; /* イベントNo */
- struct
- {
- COLOR_T cur; /* カーソルバー部分 */
- COLOR_T bar; /* バー部分 */
- COLOR_T hil, sha; /* ハイライト,シャドー */
- COLOR_T mrk; /* マーク */
- COLOR_T btn; /* ボタン */
- } col;
- } SB_T;
-
-
- #define SB_ATT_VERTICAL (0x0000_0001) /* 垂直 */
- #define SB_ATT_HORIZON (0x0000_0002) /* 水平 */
- #define SB_ATT_SCALE (0x0000_0004) /* スコープ可変タイプ */
- #define SB_ATT_MAXADJUST (0x0000_0100) /* 最大値修正 */
- #define SB_ATT_DRAGSLD (0x0001_0000) /* ドラッグで即移動 */
- #define SB_ATT_BTNREP (0x0010_0000) /* ボタンリピート */
-
- #define SB_STT_EVSETIGN (0x0000_0001) /* イベント設定禁止 */
-
- #define SB_EVNO_TOPBTN (1)
- #define SB_EVNO_BTMBTN (2)
- #define SB_EVNO_DRAG (3)
- #define SB_EVNO_JUMP (4)
- #define SB_EVNO_SCALE (5)
-
- /* "sb_010.c" ----------------------------------------------------*/
- extern SB_T *SB_open( unsigned int att, WIN_T *win, int (*func)(int,SB_T *), void *ptr );
- extern EV_T *SB_ev_workAlloc( SB_T *sb, EV_T *bsEv );
- extern void SB_close( SB_T *sb );
-
- /* "sb_v20.c" ----------------------------------------------------*/
- extern int SB_vUpdate( SB_T *sb );
- extern int SB_vSetCur( SB_T *sb );
- extern int SB_vDsp( SB_T *sb, FRAME_T *fr );
-
- /* "sb_h20.c" ----------------------------------------------------*/
- extern int SB_hUpdate( SB_T *sb );
- extern int SB_hSetCur( SB_T *sb );
- extern int SB_hDsp( SB_T *sb, FRAME_T *fr );
-
- #endif
-